home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / Technical Docs / MPW 411 / Install411 < prev    next >
Encoding:
Text File  |  1992-02-07  |  2.5 KB  |  100 lines  |  [TEXT/MPS ]

  1. #                                                        3/20/90
  2. #      MPW 3.2 Install411 Script.
  3. #
  4. #    Copyright 1989, Apple Computer, Inc.
  5. #    All Rights Reserved.
  6. #
  7.  
  8. Set Exit 0
  9.  
  10. # Process input parameters.
  11.     
  12.     if "{#}" > 1
  13.         Echo "###Useage {0} [411DestinationVolume]"
  14.         Beep
  15.         Exit 1
  16.     End
  17.     
  18.     Set 411SourceDir `which "{0}"`                          # get pathname of this script
  19.     Set 411SourceDir "`files -q -f "{411SourceDir}"`"    # convert to full pathname
  20.     if "{411SourceDir}"=~/(≈:)®1≈/                        # strip the filename
  21.         Set 411SourceDir "{®1}"
  22.     End
  23.     
  24.     Set 411DestDir ""
  25.     if {#}==1
  26.         Set 411DestDir "{1}"
  27.         if "{411DestDir}"
  28.             if "`Volumes -q "{411DestDir}"`"!~/{411DestDir}/
  29.                 Echo "### 411 destination volume ∂"{411DestDir}∂" not found."
  30.                 Echo "###Useage {0} [411DestinationVolume]"
  31.                 Beep
  32.                 Exit 1
  33.             End
  34.             Set 411DestDir "{411DestDir}"411:
  35.             if not "`Exists -d "{411DestDir}"`"
  36.                 NewFolder "{411DestDir}"
  37.             End
  38.         End
  39.     End
  40.  
  41.  
  42. # Copy the 411 User Startup script into the user's MPW Shell directory.
  43.     
  44.     #disable the old UserStartup script if it exists.
  45.     if "`Exists -f "{ShellDirectory}UserStartup•~_Help_"`"
  46.         Rename "{ShellDirectory}UserStartup•~_Help_" "{ShellDirectory}UserStartup.~_Help_" ≥dev:null
  47.     End
  48.     Duplicate "{411SourceDir}Tools:UserStartup•Help"     "{ShellDirectory}"
  49.  
  50. # Remove old help system files.
  51.     
  52.     Delete  -y "{ShellDirectory}Help Folder"
  53.  
  54. # Copy the 411 tools into the user's MPW Tools directory.
  55.  
  56.     Duplicate -y "{411SourceDir}Tools:Get"             "{MPW}Tools:"
  57.  
  58.  
  59. # Copy the entire 411 folder from the Source location to the specified destination
  60.  
  61.     if "{411DestDir}"
  62.         Duplicate "{411SourceDir}"≈     "{411DestDir}"
  63.     
  64.         # delete the old 'Help Files' folder if it exists
  65.  
  66.         if "`Exists -d "{411DestDir}Help Files:"`"
  67.             Delete  "{411DestDir}"'Help Files':CIncludesHelp≈
  68.             Delete  "{411DestDir}"'Help Files':PInterfacesHelp≈
  69.             Delete  "{411DestDir}"'Help Files':MPWHelp≈
  70.             Delete  "{411DestDir}"'Help Files':ResourcesHelp≈
  71.             Delete  "{411DestDir}"'Help Files':TechNotesHelp≈
  72.             Delete  "{411DestDir}"'Help Files':InsideMacintoshHelp≈
  73.         
  74.             if "`files "{411DestDir}Help Files:"`"==""
  75.                 Delete -y "{411DestDir}Help Files:"
  76.             End
  77.         End    
  78.  
  79.         # delete the old 'Tools and Scripts' folder if it exists
  80.  
  81.         if "`Exists -d "{411DestDir}Tools and Scripts:"`"
  82.             Delete -y "{411DestDir}Tools and Scripts:"
  83.         End
  84.     End
  85.     
  86.  
  87. # Setup the 411 directory.
  88.  
  89.     Set HelpDirectory "{ShellDirectory}Help Folder:"
  90.         
  91.     if not "`Exists "{HelpDirectory}"`"
  92.         NewFolder "{HelpDirectory}"
  93.     End
  94.     if "{411DestDir}"
  95.         Echo "{411DestDir}"
  96.     Else
  97.         Echo "{411SourceDir}"
  98.     End  >"{HelpDirectory}Help_Folder"
  99.     
  100.